@echo off
echo Starting MCP Calculator Server...
echo ================================

:: 检查Python是否安装
python --version >nul 2>&1
if %errorlevel% neq 0 (
    echo Error: Python is not installed or not in PATH
    pause
    exit /b 1
)

:: 检查依赖是否安装
echo Checking dependencies...
pip show mcp >nul 2>&1
if %errorlevel% neq 0 (
    echo Installing dependencies...
    pip install -r requirements.txt
    if %errorlevel% neq 0 (
        echo Error: Failed to install dependencies
        pause
        exit /b 1
    )
)

:: 启动服务
echo Starting calculator server...
python main.py

echo.
echo Server stopped.
pause